package cn.edu.cqytxy.service;

import cn.edu.cqytxy.dao.AircraftDao;
import cn.edu.cqytxy.entity.Aircraft;
import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * 军用飞机业务逻辑
 *
 * @author yinjw
 */
public class AircraftService {

    private AircraftDao aircraftDao = new AircraftDao();

    public int insertAircraft(Aircraft aircraft) {
        return aircraftDao.insertAircraft(aircraft);
    }


    public String selectAll() {
        List<Aircraft> aircrafts = aircraftDao.selectAll();
        return JSON.toJSONString(aircrafts);
    }
}
